package com.sduept.nwld.dataserver.rest;


import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.PathVariable;

import com.alibaba.fastjson.JSONObject;
import com.sduept.core.dao.SuperDAO;
import com.sduept.nwld.dataserver.manager.countanalyse.ProtectAnalysisManger;

/**
 * @author laiy
 */
@RestController
@RequestMapping("/check/")
public class CheckServices {

	@Autowired
	private SuperDAO dao;
	@Autowired
	private ProtectAnalysisManger protectAnalysisManger;

	@GetMapping("/getMonthCheckPlans/{year}")
	public String getMonthCheckPlans1(@PathVariable("year") String year) {
		String [] s = year.split("_");
		 String jsonString =  protectAnalysisManger.getMonthCheckPlans(s[0],s[1]);
		 return JSONObject.parse(jsonString).toString();
	}
}
